<?php

/**
 * Lectura_Citologia form base class.
 *
 * @method Lectura_Citologia getObject() Returns the current form's model object
 *
 * @package    citologia
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BaseLectura_CitologiaForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                           => new sfWidgetFormInputHidden(),
      'usuarios_id'                  => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Usuarios'), 'add_empty' => false)),
      'citologia_id'                 => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Citologia'), 'add_empty' => false)),
      'calidadmuestra'               => new sfWidgetFormInputText(),
      'identificacion'               => new sfWidgetFormInputText(),
      'infoclinica'                  => new sfWidgetFormInputText(),
      'numeroepiteliales'            => new sfWidgetFormInputText(),
      'numeroendocerviales'          => new sfWidgetFormInputText(),
      'inadecuadaxq'                 => new sfWidgetFormInputText(),
      'anomaliascelulasescamosas_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Anomalias_Celulas_Escamosas'), 'add_empty' => false)),
      'evaluacionhormonal_id'        => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Evaluacion_Hormonal'), 'add_empty' => false)),
      'resultadohistopatologico_id'  => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Resultado_Histopatologico'), 'add_empty' => false)),
      'observaciones'                => new sfWidgetFormTextarea(),
      'created_at'                   => new sfWidgetFormDateTime(),
      'updated_at'                   => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'                           => new sfValidatorChoice(array('choices' => array($this->getObject()->get('id')), 'empty_value' => $this->getObject()->get('id'), 'required' => false)),
      'usuarios_id'                  => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Usuarios'))),
      'citologia_id'                 => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Citologia'))),
      'calidadmuestra'               => new sfValidatorInteger(),
      'identificacion'               => new sfValidatorInteger(),
      'infoclinica'                  => new sfValidatorInteger(),
      'numeroepiteliales'            => new sfValidatorInteger(),
      'numeroendocerviales'          => new sfValidatorInteger(),
      'inadecuadaxq'                 => new sfValidatorString(array('max_length' => 200, 'required' => false)),
      'anomaliascelulasescamosas_id' => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Anomalias_Celulas_Escamosas'))),
      'evaluacionhormonal_id'        => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Evaluacion_Hormonal'))),
      'resultadohistopatologico_id'  => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Resultado_Histopatologico'))),
      'observaciones'                => new sfValidatorString(array('max_length' => 500, 'required' => false)),
      'created_at'                   => new sfValidatorDateTime(),
      'updated_at'                   => new sfValidatorDateTime(),
    ));

    $this->widgetSchema->setNameFormat('lectura_citologia[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'Lectura_Citologia';
  }

}
